<%@ Control Language="C#" %>
<%@ Register TagPrefix="CS" Namespace="CommunityServer.Controls" Assembly="CommunityServer.Controls" %>
<%@ Register TagPrefix="CSD" Namespace="CommunityServer.Discussions.Controls" Assembly="CommunityServer.Discussions" %>
<%@ import Namespace="CommunityServer.Components" %>
<%@ import Namespace="CommunityServer.Controls" %>
<%@ import Namespace="CommunityServer" %>

<div class="CommonContentArea">
	<div class="CommonBreadCrumbArea"><CSD:BreadCrumb ShowHome="true" UseForumsHome="false" runat="server" id="SearchBreadCrumb"/></div>
	<h2 class="CommonTitle"><asp:Label id="ForumName" Runat="server" /></h2>
	<div class="CommonContent">
		<div class="CommonDescription"><asp:Label CssClass="h2Desc" id="ForumDescription" Runat="server" /></div>
	
		<cs:StatusMessage runat="server" id="formStatus" />
		<div class="CommonFormArea">
		<div id="SearchTexbox" class="CommonFormField">
			<CS:DefaultButtonTextBox button="SearchButtonTop" id="SearchTextTop" runat="server"  columns="55" />
			<span id="SearchBoxValidatorTop" style="color: red" runat="server" visible="false">*</span>
			<asp:Button id="SearchButtonTop" runat="server" /> <a href="<%=Globals.GetSiteUrls().SearchAdvanced%>"><CS:ResourceLabel runat="server" ResourceName="Search_MoreSearchOptions" id="Resourcelabel1"/></a>
			<asp:Panel ID = "SearchRssOption" Runat="server" Visible ="False">
			    <CS:RssButton runat = "Server" id = "Rss" />
			</asp:Panel>
		</div>
		</div>
	
		<asp:Panel id="SearchResultsDisplay" Runat="server">
			<div class="CommonSearchStatistics">
				<cs:CurrentPage id="TotalResults" runat="server" />
				<asp:Literal id="SearchDuration" runat="server"></asp:Literal>
			</div>
		
			<asp:Repeater id="SearchRepeater" runat="Server" EnableViewState="false">
				<HeaderTemplate>
					<ul class="CommonSearchResultList">
				</HeaderTemplate>
				<ItemTemplate>
					<li>
					<div class="CommonSearchResultArea">
						<h4 class="CommonSearchResultName"><a href="<%# DataBinder.Eval(Container.DataItem, "Url") %>"><%# DataBinder.Eval(Container.DataItem, "Title") %></a></h4>
						<div class="CommonSearchResult">
							<%# DataBinder.Eval(Container.DataItem, "BestMatch").ToString().Length > 0 ? DataBinder.Eval(Container.DataItem, "BestMatch") : Formatter.GetBodySummary(DataBinder.Eval(Container.DataItem, "Body").ToString(),350, SearchTextTop.Text, System.Drawing.Color.Black, System.Drawing.Color.Yellow) %>
						</div>
						<div class="CommonSearchResultDetails">
							<CS:ResourceLabel runat="server" ResourceName="SearchResults_PostTo" ID="Resourcelabel3"/>&nbsp;<cs:href Runat="server" ID = "SectionUrl" Text = '<%# DataBinder.Eval(Container.DataItem, "SectionName") %>' /> <cs:href runat = "Server" id="ApplicationUrl" />&nbsp;<CS:ResourceLabel runat="server" ResourceName="SearchResults_By" ID="Resourcelabel4"/>&nbsp;<cs:href runat="server" id="ProfileUrl" />&nbsp;<CS:ResourceLabel runat="server" ResourceName="SearchResults_On" ID="Resourcelabel5"/>&nbsp;<%# DataBinder.Eval(Container.DataItem, "PostDate","{0:MMMM d, yyyy}") %>
						    <%# (bool)DataBinder.Eval(Container.DataItem, "HasPostCategories") ? String.Concat("<br>", ResourceManager.GetString("TagListTitle"), String.Join(", ", (string[])DataBinder.Eval(Container.DataItem, "PostCategories"))) : ""%>
						</div>
					</div>
					</li>
				</ItemTemplate>
				<FooterTemplate>
					</ul>
				</FooterTemplate>
			</asp:Repeater>

			<div class="CommonFormArea">
			<div id="SearchTexboxBottom" class="CommonFormField">
					<CS:DefaultButtonTextBox button="SearchButtonBottom" id="SearchTextBottom" runat="server" MaxLength="64" columns="55" />
					<span id="SearchBoxValidatorBottom" style="color: red" runat="server" visible="false">*</span>
					<asp:Button id="SearchButtonBottom" runat="server" />  <a href="<%=Globals.GetSiteUrls().SearchAdvanced%>"><CS:ResourceLabel runat="server" ResourceName="Search_MoreSearchOptions" id="Resourcelabel2"/></a>
			</div>
			</div>
				    
			<div align="center" class="CommonPagingArea">
				<CS:Pager id="Pager" runat="server" />
			</div>
		</asp:Panel>
	</div>
</div>